import configUrls from '../urls/member'
import { get, post, upload } from '../axios'


export default {

  //会员
  //会员-会员分组管理-新增
  fetchMemberGroup(data: any) {
    return post(configUrls.memberGroup, data)
  },
  //会员-会员分组管理-删除
  fetchMemberGroupDelete(data: any) {
    return post(configUrls.memberGroupDelete, data)
  },
  //会员-会员分组管理-详情
  fetchMemberGroupDetail(data: { id: number }) {
    return get(`${configUrls.memberGroupDetail}/${data.id}`, {})
  },
  //会员-会员分组管理-移动
  fetchChangeGroup(data: any) {
    return post(configUrls.changeGroup, data)
  },
  // //会员-会员分组管理-会员组会员分页
  // fetchGroupUserPage(data: any) {
  //   return get(configUrls.groupUserPage, data)
  // },
  //会员-会员分组管理-移出
  fetchRemoveGroup(data: any) {
    return post(configUrls.removeGroup, data)
  },
  //会员-会员分组管理-分页
  fetchMemberGroupPage(data: any) {
    return get(configUrls.memberGroupPage, data)
  },
  //会员-会员分组管理-列表
  fetchMemberGroupList(data: any) {
    return get(configUrls.memberGroupList, data)
  },
  //会员-会员分组管理-特权删除
  fetchPrivilegeUpdate(data: any) {
    return post(configUrls.privilegeUpdate, data)
  },
  //会员-会员分组管理-名称唯一性校验
  fetchMemberGroupUnique(data: any) {
    return get(configUrls.memberGroupUnique, data)
  },
  //会员-会员分组管理-更新
  fetchMemberGroupUpdate(data: any) {
    return post(configUrls.memberGroupUpdate, data)
  },
  //会员-会员分组管理-设为默认会员组
  fetchMemberGroupDefault(data: any) {
    return post(configUrls.memberGroupDefault, data)
  },

  //会员-会员管理-新建
  fetchMemberAddNew(data: any) {
    return post(configUrls.memberAdd, data)
  },
  //会员-会员管理-分页列表
  fetchMemberPage(data: any) {
    return get(configUrls.memberPage, data)
  },
  //会员-会员管理-更新
  fetchMemberUpdate(data: any) {
    return post(configUrls.memberUpdate, data)
  },
  //会员-会员管理-删除
  fetchMemberDelete(data: any) {
    return post(configUrls.memberDelete, data)
  },
  //会员-会员管理-禁用
  fetchMemberDisable(data: any) {
    return post(configUrls.memberDisable, data)
  },
  //会员-会员管理-启用
  fetchMemberEnable(data: any) {
    return post(configUrls.memberEnable, data)
  },
  //会员-会员管理-待审核会员分页
  fetchMemberAuditingPage(data: any) {
    return get(configUrls.memberAuditingPage, data)
  },
  //会员-会员管理-重置密码
  fetchMemberResetpwd(data: any) {
    return post(configUrls.memberResetpwd, data)
  },
  //会员-会员管理-会员审核
  fetchMemberAudit(data: any) {
    return post(configUrls.memberAudit, data)
  },
  //会员-会员管理-详情
  fetchMemberDetail(data: { id: number }) {
    return get(`${configUrls.memberDetail}/${data.id}`, {})
  },
}